﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Jxym.DBUtility;
using Jxym.wlkc2011.Module.CMS.MODEL;

namespace Jxym.wlkc2011.Module.CMS.SERVER
{
    public partial class ContentClass : System.Web.UI.Page
    {
        private string _siteName = "default";

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Response.HeaderEncoding = System.Text.Encoding.UTF8;
                Response.ContentEncoding = System.Text.Encoding.UTF8;
                Response.ContentType = "application/json";
                Response.StatusCode = 200;

                if (Request.Params["siteName"] != null)
                {
                    _siteName = Request.Params["siteName"];

                    Jxym.wlkc2011.Module.CMS.Public.cmsPublic cp = new Public.cmsPublic();

                    string tree = cp.GetAdminClassTree(_siteName);

                    Response.Write(tree);
                }
                else
                {
                    Response.Write("[]");
                }
                Response.End();
            }
        }
    }
}